package com.ruoyi.server.api.message.entity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.Api;
import org.springframework.data.annotation.Id;
import java.io.Serializable;
import java.sql.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
/**
 * (Messages)实体类
 *
 * @author makejava
 * @since 2024-10-21 14:36:42
 */
@Api(value = "信息表的实体类")
@Entity
@JsonIgnoreProperties(ignoreUnknown = true)
public class Message implements Serializable {
    private static final long serialVersionUID = -33232607520092958L;
    @Id
/** 信息id*/
    private long id;
/** 信息内容*/
    private String text;
    /** 信息发送者*/
    private String fromUser;
    /** 语音路径*/
    private String voicePath;
    /** 接收者*/
    private String recipientID;
    /** 信息发送进度*/
    private Long progress;
    /** 信息发送时间*/
    private Date sendTime;
    /** 信息撤回时间*/
    private Date time;
    /** 心跳包*/
    private boolean isHeartbeat;
    /** 消息是否已被阅读*/
    private boolean read;
    /** 阅读此消息的用户ID*/
    private String readUserId;
  /** 是否撤回*/
   private boolean recall;

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public boolean isRead() {
        return read;
    }

    public boolean isRecall() {
        return recall;
    }

    public void setRecall(boolean recall) {
        this.recall = recall;
    }

    public void setRead(boolean read) {
        this.read = read;
    }

    public String getReadUserId() {
        return readUserId;
    }

    public void setReadUserId(String readUserId) {
        this.readUserId = readUserId;
    }

    @javax.persistence.Id
    @GeneratedValue
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getFromUser() {
        return fromUser;
    }

    public void setFromUser(String fromUser) {
        this.fromUser = fromUser;
    }

    public String getVoicePath() {
        return voicePath;
    }

    public void setVoicePath(String voicePath) {
        this.voicePath = voicePath;
    }

    public String getRecipientID() {
        return recipientID;
    }

    public void setRecipientID(String recipientID) {
        this.recipientID = recipientID;
    }

    public Date getSendTime() {
        return sendTime;
    }

    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    public Long getProgress() {
        return progress;
    }

    public void setProgress(Long progress) {
        this.progress = progress;
    }

    public boolean isHeartbeat() {
        return isHeartbeat;
    }

    public void setHeartbeat(boolean heartbeat) {
        isHeartbeat = heartbeat;
    }
}

